package com.zelin.rabbit.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

@RabbitListener(queues = "zelin")
@Component
public class MQListener1 {

    //1.监听得到消息
    @RabbitHandler
    public void getMessage(String message){
        System.out.println("消费者1接收到消息："+message);
    }

}
